import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: mirac
 * Date: 2025-07-24
 * Time: 17:29
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int x = scanner.nextInt();
        long sum = func(x);
        System.out.println(sum);
    }

    public static long func(int n) {
        long x = 1L;
        long y = 1L;
        long z = 0;
        if(n == 1 || n == 2) {
            return 1;
        }
        for (int i = 2; i < n; i++) {
            z = x + y;
            x = y;
            y = z;
        }
        return z;
    }
}
